/*
  File:    Curvature.h
  Purpose: Advanced routines for level set-based curvature and normal vector 
           calculations. Fully adaptive for level set irregularities. 

  Contact: Paul Macklin
           pmacklin@math.uci.edu
		  http://math.uci.edu/~pmacklin
*/

#include "../Matrix.h"

#include "Contour.h"
#include "Polynomial.h"

#include "GeometricData.h"

double DistanceToCurve(double x, double y, Polynomial& Xcurve, Polynomial& Ycurve );

GeometricDataPacket LevelSetGeometricData( Matrix &Xin, Matrix &Yin, Matrix &PhiIn, int i, int j );
GeometricDataPacket ContourGeometricData( Contour& InputContour ); // , double x, double y );
GeometricDataPacket AdvancedContourGeometricData( Contour& pInputContour , double DeltaX, double DeltaY );

Matrix GenerateQualityMatrix( Matrix& Xin, Matrix& Yin, Matrix &PhiIn );
GeometricDataPacket AdaptiveGeometricData( Matrix& Xin, Matrix& Yin, Matrix& PhiIn, double x, double y );
bool GenerateGeometricGlobals( Matrix &Xin, Matrix &Yin, Matrix& PhiIn );

bool OutputGeometricData( char* NormalXname, char* NormalYname, char* CurvatureName );

